<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<jsp:directive.page import="com.anhry.www.safety.util.Util"/>
<%@ include file="/WEB-INF/pages/share/taglib.jsp"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
  <head>
    <base href="<%=basePath%>">
    <title>运城市安全生产隐患排查治理信息系统</title>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<link href="<%=basePath%>/css/style.css" rel="stylesheet" type="text/css"/>
	<script src="<%=basePath%>/js/js.js" type="text/javascript"></script>
	<script type="text/javascript" src="<%=basePath%>/js/jquery-1.7.2.js"></script>
	<script type="text/javascript" src="<%=basePath%>/js/check_jquery.js"></script>
	<script type="text/javascript" src="<%=path%>/js/table_span.js"></script>
	<script>
			$(document).ready(function(){
				document.documentElement.scrollTop = ${scrollTop}+20;
			});
	</script>
	<script type="text/javascript">
		function check(yhType,bzhId){
		var scrollTop = document.documentElement.scrollTop;
			var bgdId = '${bgdId}';
			var hzdId = '${hzdId}';
			var cType = '${cType}';
             if(yhType==0){
				var vf =confirm("您确定要检查此项记录吗？");
				if(vf){
					window.location.href='<%=basePath%>/zczb/_saveYhno.action?bzhId='+bzhId+'&hzdId='+hzdId+'&bgdId='+bgdId+'&cType='+cType+'&scrollTop='+scrollTop;
				}else{
					return;
				}
			}else if(yhType==1){
				window.location.href='<%=basePath%>/zczb/_yhEdit.action?bzhId='+bzhId+'&yhType='+yhType+'&hzdId='+hzdId+'&bgdId='+bgdId+'&cType='+cType+'&scrollTop='+scrollTop;
			}else if(yhType==2){
				var vf =confirm("您确定该项为重大隐患吗？重大隐患上报后不能修改，删除！");
				if(vf){
					window.location.href='<%=basePath%>/zczb/_yhEdit.action?bzhId='+bzhId+'&yhType='+yhType+'&hzdId='+hzdId+'&bgdId='+bgdId+'&cType='+cType+'&scrollTop='+scrollTop;
				}else{
					return;
				}
			}
		}
		function editYh(yhType,yhId){
		var scrollTop = document.documentElement.scrollTop;
			var bgdId = '${bgdId}';
			var hzdId = '${hzdId}';
			var cType = '${cType}';
			window.location.href='<%=basePath%>/zczb/_yhEdit.action?yhId='+yhId+'&yhType='+yhType+'&hzdId='+hzdId+'&bgdId='+bgdId+'&cType='+cType+'&scrollTop='+scrollTop;
		}
		function deleYh(yhType,yhId){
		var scrollTop = document.documentElement.scrollTop;
			var bgdId = '${bgdId}';
			var hzdId = '${hzdId}';
			var cType = '${cType}';
			window.location.href='<%=basePath%>/zczb/_deleYh.action?yhId='+yhId+'&yhType='+yhType+'&hzdId='+hzdId+'&bgdId='+bgdId+'&cType='+cType+'&scrollTop='+scrollTop;
		}
	</script>
  </head>
  
 <body onload="_w_table_lefttitle_rowspan('#mytable','1','3');" style="background: #fff">
	<table border="0" cellpadding="0" cellspacing="0" align="center" id="mytable" class="infolist" style="width: 99%;">
		<tr class="cz">
			<th width="10%">Ⅰ级隐患类型</th>
     		<th width="10%">Ⅱ级隐患类型</th>
     		<th width="10%">Ⅲ级隐患类型</th>
     		<th width="10%">Ⅳ级隐患类型</th>
     		<th width="30%">自查标准</th>
     		<th width="20%">参考依据</th>
			<th width="10%" style="border-right:none">操作</th>
		</tr>
		<s:if test="%{tab!=null}">
			<s:if test="%{objList.size>0}">
			  	<s:iterator id="obj" value="objList" status="x">
			  		<tr class="cz">
						<td align="center">${obj.infoType1Name}</td>
			     		<td align="left">${obj.infoType2Name }</td>
			     		<td align="center">${obj.infoType3 }</td>
			     		<td align="center">${obj.infoType4 }</td>
			     		<td align="center">${obj.infoContent }</td>
			     		<td align="center">${obj.infoYj }</td>
			     		<td align="center">
			     			<s:if test="%{#obj.yhId!=null}">
			     				<s:if test="%{#obj.yhType==0}">无此隐患
			     					<a title="删除此检查记录" href="javascript:void(0)" onclick="deleYh('0','${obj.yhId}')"><img src="<%=basePath%>/images/deletex.gif"/></a>
			     				</s:if>
			     				<s:if test="%{#obj.yhType==1}">
			     				<a title="修改隐患信息" href="javascript:void(0)" onclick="editYh('1','${obj.yhId}')">一般隐患</a>
			     				<a title="删除此检查记录" href="javascript:void(0)" onclick="deleYh('1','${obj.yhId}')"><img src="<%=basePath%>/images/deletex.gif"/></a>
			     				</s:if>
			     				<s:if test="%{#obj.yhType==2}">
			     					<font color="red" title="该项为重大隐患，上报后在未审核之前不能进行任何操作！">重大隐患</font>
			     				</s:if>
			     			</s:if>
			     			<s:else>
				     			<input type="radio" name="yh${obj.id}" value="0" onclick="check('0','${obj.id }');"/>无此隐患<br>
								<input type="radio" name="yh${obj.id}" value="1" onclick="check('1','${obj.id }');"/>一般隐患<br>
								<input type="radio" name="yh${obj.id}" value="2" onclick="check('2','${obj.id }');"/>重大隐患<br>
			     			</s:else>
						</td>
					</tr>
			  		
			  	</s:iterator>						  
			</s:if>
			<s:else>
			 	<tr>
					<td colspan="7" height="40" style="text-align:center">
					  	该类型无内容
					</td>
				</tr>
			</s:else>
		</s:if>
		<s:else>
		 	<tr>
				<td colspan="7" height="40" style="text-align:center">
				  	您企业所属的企业类型没有相对应的自查标准，请联系管理部门。
				</td>
			</tr>
		</s:else>
	</table>
<s:if test="%{tip!=null}">
	<script>
		alert('${tip}');
	</script>
</s:if>
</body>
</html>
